package cn.topevery.garden.dal.logic;

import cn.topevery.garden.dal.dao.ExtentGroupUserDao;
import cn.topevery.garden.entity.po.ExtentGroupUser;
import cn.topevery.garden.framework.base.BaseLogic;
import hw.topevery.framework.db.base.BaseEntityDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 
 *
 * @author code-generate
 * @date 2021-08-06
 */
@Service
public class ExtentGroupUserLogic extends BaseLogic<ExtentGroupUser> {
    @Autowired
    ExtentGroupUserDao extentGroupUserDao;

    @Override
    public BaseEntityDao<ExtentGroupUser, Integer> getDao() {
        return extentGroupUserDao;
    }


    /**
     * 描述 新增/更新.
     *
     * @param userId the user id
     * @return the boolean
     * @author wenzhao.lin
     * @created 2021 -08-23 14:02:35 Save or update boolean.
     */
    public  boolean saveOrUpdate(String userId, List<ExtentGroupUser> list){
        for(ExtentGroupUser entity : list){
            extentGroupUserDao.saveOrUpdate(userId, entity);
        }
        return true;
    }


}
